program main

    use, intrinsic :: iso_c_binding
    use gsl_statistics_m

    real(8), target :: x(3) = [real(8) :: 1.0, 2.0, 3.0]

    print *, gsl_stats_mean(c_loc(x), 1_c_size_t, 3_c_size_t)
    print *, gsl_stats_variance(c_loc(x), 1_c_size_t, 3_c_size_t)
    print *, gsl_stats_sd(c_loc(x), 1_c_size_t, 3_c_size_t)
    print *, gsl_stats_tss(c_loc(x), 1_c_size_t, 3_c_size_t)
    print *, gsl_stats_variance_with_fixed_mean(c_loc(x), 1_c_size_t, 3_c_size_t, 2.0_c_double)
    print *, gsl_stats_sd_with_fixed_mean(c_loc(x), 1_c_size_t, 3_c_size_t, 2.0_c_double)

end program main
